public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();

        binaryTree.Qbianli(root);
        System.out.println("====");
        binaryTree.Zbianli(root);
        System.out.println("====");
        binaryTree.Hbianli(root);
        System.out.println("====");

        int i = binaryTree.size1(root);
        System.out.println("节点个数是："+i);

        int a = binaryTree.size2(root);
        System.out.println("节点个数是："+a);

        int c = binaryTree.sizeye1(root);
        System.out.println("叶子个数是："+c);

        int d = binaryTree.sizeye2(root);
        System.out.println("叶子个数是："+d);

        int f = binaryTree.tree(root,3);
        System.out.println("树第k层节点个数是："+f);

        int r = binaryTree.Hight(root);
        System.out.println("树的高度是："+r);

        BinaryTree.TreeNode ret = binaryTree.value(root,'H');
        System.out.println("找到value值："+ ret.val);

        System.out.println("这是分层打印：");
        binaryTree.prin(root);
    }
}
